package com.travelSpring.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.xml.crypto.Data;
import java.time.LocalDateTime;

/**
 * 功能：
 * 作者：卷心菜
 * 日期：2025/2/25 22:47
 */
@lombok.Data
public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private String role;
    private String name;
    private String email;
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    private String address;
    private String avatar;
    private String phone;
    private String examine;

    @TableField(exist = false)  // 关键注解：表示非数据库字段
    private String token;
    @TableField(exist = false)
    private String ids;
    @TableField(exist = false)
    private String[] idsArr;
}
